Skip to content

Add AI code review customization files [Rebase & FF]#1460

Merged
makubacki merged 3 commits intoOpenDevicePartnership:mainfrom
makubacki:add_ai_review_files
Apr 17, 2026
Merged

Add AI code review customization files [Rebase & FF]#1460
makubacki merged 3 commits intoOpenDevicePartnership:mainfrom
makubacki:add_ai_review_files

Conversation

@makubacki
Copy link
Copy Markdown
Collaborator

Description

Closes #1453

Adds project-level AI customization files to support AI-assisted code review.

These files encode Patina's domain-specific conventions so that AI reviewers can flag violations locally, prior to human review.

The files are layered:

  1. Always-on instructions (.github/copilot-instructions.md): Covers global conventions across the codebase.

  2. File-based instructions (.github/instructions/): Currently, provides component-specific instructions in components.instructions.md(applyTo: components/**) to supplement the global instructions. These load only when editing matching files to minimize token cost.

  3. Review prompt file (.github/prompts/review.prompt.md): A reusable /review slash command that defines a structured review checklist. This is to provide a convenient way to reliably perform the same set of review steps. Delegates convention details to the always-on instructions to avoid duplication.

  4. Reviewer agent (.github/agents/reviewer.agent.md): A read-only review persona restricted to search and read tool sets (no edit or execute tools). Includes a handoff to the default agent for implementing fixes after review.

References:

How This Was Tested

  • Use the "Patina Code Reviewer" locally

Integration Instructions

  • N/A

This PR is in draft as it serves as a starting open to changes from others before publishing for broader review.

@patina-automation
Copy link
Copy Markdown
Contributor

patina-automation bot commented Apr 8, 2026

✅ QEMU Validation Passed

All QEMU validation jobs completed successfully.

Note: Q35 is only built on Windows hosts (QEMU boot is disabled due to a QEMU vfat issue).

Workflow run: https://github.com/OpenDevicePartnership/patina/actions/runs/24581345437

Boot Time to EFI Shell

Platform Elapsed
Q35 (Linux Host) 28.0s
SBSA (Linux Host) 1m 4s

Dependencies

Repository Ref
patina 053b953
patina-dxe-core-qemu eebcb79
patina-fw-patcher 3960603
patina-qemu firmware v3.0.0
patina-qemu build script 03e3935

This comment was automatically generated by the Patina QEMU PR Validation Post workflow.

@github-actions github-actions bot added the impact:non-functional Does not have a functional impact label Apr 8, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Comment thread .github/instructions/components.instructions.md Outdated
Comment thread .github/instructions/components.instructions.md Outdated
@makubacki makubacki force-pushed the add_ai_review_files branch from 0560dd5 to c034f62 Compare April 16, 2026 13:59
@makubacki makubacki marked this pull request as ready for review April 16, 2026 13:59
@makubacki makubacki requested review from cfernald, os-d and vineelko April 16, 2026 14:00
Comment thread .github/prompts/review.prompt.md
Copy link
Copy Markdown
Contributor

@os-d os-d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to reference these in the mdbook? If so, I'd recommend stressing the optional nature of these, it is for local development and will not be an autoenforced reviewer, etc.

Comment thread .github/prompts/review.prompt.md
Comment thread .github/prompts/review.prompt.md
Comment thread .github/copilot-instructions.md Outdated
Comment thread .github/copilot-instructions.md Outdated
Comment thread .github/instructions/components.instructions.md Outdated
Comment thread .github/copilot-instructions.md
Comment thread .github/copilot-instructions.md
Comment thread .github/copilot-instructions.md Outdated
@makubacki makubacki force-pushed the add_ai_review_files branch from c034f62 to e25f19a Compare April 16, 2026 23:22
@makubacki makubacki changed the title Add AI code review customization files Add AI code review customization files [Rebase & FF] Apr 16, 2026
@makubacki makubacki force-pushed the add_ai_review_files branch from e25f19a to 22d0224 Compare April 16, 2026 23:27
Includes recently introduced params.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
The "args" and "returns" sections were explicitly disallowed
previously. This update acknowledges that there may be cases where
these sections can be helpful for clarifying ambiguity in the function
signature, but they should not be present by default.

This aligns better with the way the sections are already being used
in code.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Adds project-level AI customization files to support AI-assisted code
review.

These files encode Patina's domain-specific conventions so that AI
reviewers can flag violations locally, prior to human review.

The files are layered:

1. Always-on instructions (.github/copilot-instructions.md): Covers
   global conventions across the codebase.

2. File-based instructions (.github/instructions/): Currently,
   provides component-specific instructions in
   components.instructions.md(applyTo: components/**) to supplement
   the global instructions. These load only when editing matching
   files to minimize token cost.

3. Review prompt file (.github/prompts/review.prompt.md): A reusable
   /review slash command that defines a structured review checklist.
   This is to provide a convenient way to reliably perform the same
   set of review steps. Delegates convention details to the always-on
   instructions to avoid duplication.

4. Reviewer agent (.github/agents/reviewer.agent.md): A read-only
   review persona restricted to `search` and `read` tool sets (no edit
   or execute tools). Includes a handoff to the default agent for
   implementing fixes after review.

References:

- VS Code Customization Overview:
  https://code.visualstudio.com/docs/copilot/concepts/customization
- Custom Instructions:
  https://code.visualstudio.com/docs/copilot/customization/custom-instructions
- Prompt Files:
  https://code.visualstudio.com/docs/copilot/customization/prompt-files
- Custom Agents:
  https://code.visualstudio.com/docs/copilot/customization/custom-agents

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
@makubacki makubacki force-pushed the add_ai_review_files branch from 22d0224 to 053b953 Compare April 17, 2026 18:33
@makubacki makubacki enabled auto-merge (rebase) April 17, 2026 18:35
@makubacki makubacki merged commit b03bbb6 into OpenDevicePartnership:main Apr 17, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact:non-functional Does not have a functional impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task] Add AI Review Skill

5 participants